﻿<%@ Page Title="Shopping Cart" Language="C#" MasterPageFile="~/Style/FrontEnd/FrontEnd.master" AutoEventWireup="true" CodeBehind="Cart.aspx.cs" Inherits="OnlineFloralShop.Cart" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style type="text/css">
    #bigtitle{
        border-top:1px solid #F3F3F3; border-bottom:1px solid #F3F3F3; font-weight: bold; font-size: 16px; padding: 3px 0px;
        margin-bottom: 2px;
    }
    #cart_submit .title{
        height:27px; text-align: center; vertical-align: middle;
        border-bottom: 1px solid #F3F3F3;
        border-left: 1px solid #F3F3F3;
        border-top: 1px solid #F3F3F3;
        background: #FFFFB0;
        font-size: 13px;
    }
    #cart_submit .content{
        padding:3px 0px;
        text-align: center; vertical-align: middle;
        border-bottom: 1px solid #F3F3F3;
        border-left: 1px solid #F3F3F3;
    }
    #cart_submit .button{
        height: 40px; text-align: right; vertical-align: middle; background: none; border: none;
        padding: 0px; margin: 0px;
    }
    .buttonviewdetail{
        border:none;
        cursor: pointer;
        font-size:12px;
        background: #333333;
        padding: 3px 12px;
        color: #FFFFFF;
        font-weight: bold;
    }
    .buttonviewdetail:hover{
        border:none;
        cursor: pointer;
        font-size:12px;
        background: #999999;
        padding: 2px 11px;
        color: #333333;
        text-decoration: none;
        border:1px solid #333333;
        font-weight: bold;
    }
    .viewdetail{
        font-size:12px;
        background: #333333;
        padding: 4px 12px;
        color: #FFFFFF;
        text-decoration: none;
    }
    .viewdetail:hover, .viewdetail:active, .viewdetail:focus{
        font-size:12px;
        background: #999999;
        padding: 3px 11px;
        color: #333333;
        text-decoration: none;
        border:1px solid #333333;
    }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentMain" runat="server">
    <div id="cart_submit">
    <div id="bigtitle">SHOPPING CART</div>
     <asp:ListView ID="ListView_Cart" runat="server">
     <LayoutTemplate>
    <table width="100%" cellspacing="0" cellpadding="0">
      <tbody><tr>
        <td class="title">Picture</td>
        <td class="title">Bouquest name</td>
        <td class="title">Price</td>
        <td class="title">Quantity</td>
        <td class="title">Total</td>
        <td style="border-right: 1px solid #F3F3F3;" class="title">Remove</td>
      </tr>
      <div ID="itemPlaceholder" runat="server" ></div>
      <tr>
        <td class="button" colspan="6">
            <asp:HyperLink CssClass="viewdetail" ID="hlinkContinue" runat="server">Continue Shopping</asp:HyperLink>
            <a href="Checkout.aspx" style="margin:0px 5px;" class="viewdetail" alt="Checkout" title="Checkout">Checkout</a>
            <asp:Button CssClass="viewdetail" ID="btnUpdate" runat="server" onclick="btnUpdate_Click" Text="Update" />
        </td>
      </tr>
      </tbody></table>
</LayoutTemplate>
<ItemTemplate>
            <tr>
            
        <td class="content"><img id="Img1" width="100" height="100" alt='' runat="server" src='<%# Model.Catalog.Product.GetProductDetailByProductId(Eval("Key").ToString()).Rows[0]["Images"].ToString() %>' border="0" /></td>
        <td class="content"><a href='Product/Details.aspx?ProductId=<%# Eval("Key") %>'><asp:Label ID="lbProductName" runat="server" Text='<%# Model.Catalog.Product.GetProductDetailByProductId(Eval("Key").ToString()).Rows[0]["ProductName"].ToString() %>'></asp:Label><br>(
            <asp:Label ID="lbProId" runat="server" Text='<%# Eval("Key") %>'></asp:Label>)</a></td>
        <td style="color: #BB0000;" class="content"><%# decimal.Floor(decimal.Parse(Model.Catalog.Product.GetProductDetailByProductId(Eval("Key").ToString()).Rows[0]["Price"].ToString()))%> $</td>
        <td class="content"><asp:TextBox ID="txtQuantity" Width="30" runat="server" Text='<%# Eval("Value") %>'></asp:TextBox><asp:RegularExpressionValidator
                ID="RegularExpressionValidator1" runat="server" ErrorMessage="*only digits" ControlToValidate="txtQuantity" ValidationExpression="\d*" Width="100"></asp:RegularExpressionValidator><br />
         
        </td>
        <td style="color: #BB0000;" class="content"><%# decimal.Floor(decimal.Parse(Model.Catalog.Product.GetProductDetailByProductId(Eval("Key").ToString()).Rows[0]["Price"].ToString()) * decimal.Parse(Eval("Value").ToString()))%> $</td>
        <td style="border-right: 1px solid #F3F3F3;" class="content"><asp:CheckBox ID="chb_Remove" runat="server" /></td>
      </tr>
      
   </ItemTemplate>
     <EmptyDataTemplate>
                         <div style="border:solid 1px #dedede; width:400px; margin:20px; padding:10px" >
                            <p>Your Shopping Cart is empty!.  <a class="viewdetail" href="Default.aspx" title="Buy bouquests">Buy</a></p>
                         </div>
     </EmptyDataTemplate>
    </asp:ListView>
<asp:Label ID="Label_checkQuantity" runat="server" Text="" ForeColor="#CC0000"></asp:Label>
</asp:Content>